
<?php
/**
 * Template Name: Home Page
 *
 * @package WordPress
 * @subpackage Twenty_Eleven
 * @since Twenty Eleven 1.0
 */
get_header(); ?>

		<div id="primary">
			<div id="content" role="main">
			<a href="<?php echo esc_url( home_url( '/' ) ); ?>">
					<img src="<?php header_image(); ?>" width="100%" height="100%" alt="" />
			</a>
			<?php if ( have_posts() ) : ?>

				<?php twentyeleven_content_nav( 'nav-above' ); ?>

            <?php
            global $post;
            $args = array('posts_per_page' => 7, 'slug' => 'game-new','orderby'=> 'rand','offset'=>0 );
            $myposts = get_posts( $args );
            foreach( $myposts as $post ) : setup_postdata($post); ?>
                <div class="rows clear">
                    <div class="left_game">
                     <a href="<?php echo the_permalink();?>"> <img  alt="Game : <?php the_title(); ?>" src="<?php echo get('image_thumb'); ?>"><br>  </a>
                    </div>
                    <div class="right_game">
                      <span class="title_game"><a href="<?php echo the_permalink(); ?>" title="Xem ngay"><?php the_title(); ?></a><img src="<?php echo  bloginfo('template_directory').'/images/new.gif'?>"/></span>
                      </br>
                      <span class="game_description"> <?php echo get('game_description'); ?> </span>
                      </br>
                      <span class="right_game_dowload"> <a href="<?php echo get('url_download'); ?>" target="_blank">Tải Game</a> </span>
                    </div>
               </div>
            <?php endforeach; ?>
        <div class="even_game">
          <script type="text/javascript" src="http://mclick.mobi/get/event/u/gamehay88/op/head-more/num/5/732"></script>
          <noscript>
          <div style="margin-left:0;margin-right:0;padding-top:1px;padding-bottom:1px;font-family:arial,sans-serif;font-size:13px;">
              <div>
                  <div style="padding:5px;background-color:#fff8e7;">
                      <div style="float: left;padding-top: 3px;max-width: 16px;max-height: 16px;">
                          <img src="http://sangame.net/theme/sangame06/images/13_rss.png" alt="#Game" />
                      </div>
                      <h3 style="margin:0;padding-left:5px;display:inline;border: none;"><a style="color:#12c;font-weight:400;cursor:pointer;font-size: 13px;" href="http://gamehay88.hayday.mobi" rel="nofollow"><b>Tin tức</b> game mobile cập nhật mọi lúc mọi nơi!!</a></h3>
                  </div>
              </div>
          </div>
          </noscript>

        </div>
        
			<?php twentyeleven_content_nav( 'nav-below' ); ?>

			<?php else : ?>

				<article id="post-0" class="post no-results not-found">
					<header class="entry-header">
						<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
					</header><!-- .entry-header -->

					<div class="entry-content">
						<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
						<?php get_search_form(); ?>
					</div><!-- .entry-content -->
				</article><!-- #post-0 -->

			<?php endif; ?>

			</div><!-- #content -->
		</div><!-- #primary -->

<?php ///get_sidebar(); ?>
<?php get_footer(); ?>
